package cn.bluemobi.dylan.step.moder.http.api;


import java.util.List;

import cn.bluemobi.dylan.step.moder.bean.Goods;
import cn.bluemobi.dylan.step.moder.bean.MemberAccount;
import cn.bluemobi.dylan.step.moder.bean.Score;
import cn.bluemobi.dylan.step.moder.bean.User;
import cn.bluemobi.dylan.step.moder.http.response.HttpResponseBean;
import cn.bluemobi.dylan.step.moder.http.response.PageDataBean;
import io.reactivex.Flowable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by $Liudan on 2018/8/8 0008.
 */
public interface UserApis {

    /**
     * 登录
     *
     * @param
     * @return
     */
    @FormUrlEncoded
    @POST("login.json/")
    Flowable<HttpResponseBean<User>> login(@Field("memberPhone") String memberPhone, @Field("phoneCode") String phoneCode);

    /**
     * 用户信息修改
     *
     * @param
     * @return
     */
    @FormUrlEncoded
    @POST("updateMember.json/")
    Flowable<HttpResponseBean<User>> updateMember(@Field("memberId") int memberId, @Field("memberNickName") String memberNickName);


    /**
     * 获取验证码
     *
     * @param
     * @return
     */
    @FormUrlEncoded
    @POST("getPhoneCode.json/")
    Flowable<HttpResponseBean<User>> getPhoneCode(@Field("memberPhone") String memberPhone);

    /**
     * 积分
     *
     * @param
     * @return
     */
    @FormUrlEncoded
    @POST("getMemberAccount.json/")
    Flowable<HttpResponseBean<MemberAccount>> getMemberAccount(@Field("memberId") int memberId);


    /**
     * 积分明细
     *
     * @param
     * @return
     *
     */
    @FormUrlEncoded
    @POST("getMemberAccountLogList.json/")
    Flowable<HttpResponseBean<PageDataBean<List<Score>>>> getMemberAccountLogList(@Field("currPage") int currPage, @Field("pageSize") int pageSize, @Field("memberId") int memberId);

    /**
     * 积分明细
     *
     * @param isAdd 1 收入 2支出
     * @return
     *
     */
    @FormUrlEncoded
    @POST("getMemberAccountLogList.json/")
    Flowable<HttpResponseBean<PageDataBean<List<Score>>>> getMemberAccountLogList(@Field("currPage") int currPage, @Field("pageSize") int pageSize, @Field("memberId") int memberId,@Field("isAdd")int isAdd);


}
